<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>发表文章</title>
    
    <link rel="icon" type="image/png" href="__PUBLIC__/img/toplogo.png"/>
    <link href="__PUBLIC__/css/amazeui.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/admin.css" rel="stylesheet">

    <link href="__PUBLIC__/css/animate.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.css" rel="stylesheet">

    <script src="__PUBLIC__/js/jquery-2.1.1.js"></script>
    <script src="__PUBLIC__/js/amazeui.min.js"></script>
    <style>
    .header {
      padding-top: 80px;
      text-align: center;
    }
    .header h1 {
      font-size: 200%;
      color: #fff;
      margin-top: 30px;
    }
    .header p {
      font-size: 14px;
    }
    .sub{
      width: 100px;
      float: right;
    }
    .clear{
      clear: both;
    }
    .admin-header{
      background-color: #0E90D2;
      color: #fff;
    }
  </style>

</head>

<body class="gray-bg">
        
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>以获得更好的体验！</p>
<![endif]-->
<header class="am-topbar admin-header">
  <div class="am-topbar-brand">
    <strong>作品分享</strong>
  </div>
  <div class="am-collapse am-topbar-collapse" id="topbar-collapse">

    <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
      <li><a href="{:U('person/index')}" data-toggle="modal"><span id="login" class="am-icon-users" data-am-modal="{closeViaDimmer: 0, width: 400, height: 225}">您好，{:session('username')}</span></a>
      </li>
      <li><a><span data-am-modal="{closeViaDimmer: 0, width: 400, height: 225}">上次登录时间:{:session('lasttime')}</span></a>
      </li>         
      <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen"><span class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a></li>
    </ul>
  </div>
</header>


<div class="am-cf admin-main">
  <!-- sidebar start -->
  <div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
    <div class="am-offcanvas-bar admin-offcanvas-bar">
      <ul id="side-menu" class="am-list admin-sidebar-list">
          <li><a href="{:U('index/index')}"><span class="am-icon-home"></span>首页</a></li>
          <li><a href="#" data-toggle="modal"><i><spand class="am-icon-file" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0, width: 400, height: 225}">发表文章</spand></i></a>
          </li>
          <li><a href="{:U('myarticle/index')}" data-toggle="modal"><i><spand class="am-icon-table" data-am-modal="{target: '#doc-modal-2'}">我的文章</spand></i></a>
          </li>
          <!-- <li><a href="{:U('changepwd/index')}"><i><spand class="am-icon-pencil-square-o" data-am-modal="{closeViaDimmer: 0, width: 400, height: 225}">修改密码</spand></i></a>
          </li> -->
          <li><a href="{:U('Login/logout')}"><i><span class="am-icon-sign-out" data-am-modal="{'#doc-modal-1', closeViaDimmer: 0, width: 400, height: 225}">退出系统</span></i></a>
          </li>
      </ul>

      <div class="am-panel am-panel-default admin-sidebar-panel">
        <div class="am-panel-bd">
          <p><span class="am-icon-bookmark"></span> 公告</p>
          <p>时光静好，与君语；细水流年，与君同。—— Amaze UI</p>
        </div>
      </div>

      <div class="am-panel am-panel-default admin-sidebar-panel">
        <div class="am-panel-bd">
          <p><span class="am-icon-tag"></span> wiki</p>
          <p>Welcome to the Amaze UI wiki!</p>
        </div>
      </div>
    </div>
  </div>

  <!-- content start -->
  <div class="admin-content">
    <div class="am-cf am-padding">
      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">发表文章</strong></div>
    </div>

    <hr/>

    <div class="am-g">
      <form class="am-form am-form-horizontal" action="__URL__/doaddarticle" method="post" enctype= "multipart/form-data">
          <div class="form-group" ><label class="col-sm-2 control-label">标题：</label>
              <div class="col-sm-10"><input type="text" class="form-control" name = "title" required="" id = "title"></div>
          </div>
  
          <div class="form-group"><label class="col-sm-2 control-label">图片：<span style = "color:red;">必须</span></label>
              <div class="col-sm-10"><input type="file" name="picture" required=""></div>
          </div>

          <link href="__PUBLIC__/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
          <script type="text/plain" name="contents" id="myEditor" style="width:100%;height:510px;">
          <p>{:session('username')}发表的文章</p>
          </script>
          <div class="mail-body text-center tooltip-demo">
              <button  class="am-btn am-btn-primary am-btn-sm am-fl" id = "adds" type="submit"> 发布</button>
          </div>
          <div class="clearfix"></div>
      </form>
    </div>
  </div>
  <!-- content end -->

</div>

<footer>
  <hr>
  <p class="am-padding-left">© 2016 作品分享系统</p>
</footer>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="assets/js/amazeui.min.js"></script>

<script src="assets/js/app.js"></script>

<!-- 调用脚部文件 -->
<script type="text/javascript" src="__PUBLIC__/umeditor/third-party/jquery.min.js"></script>
<script src="__PUBLIC__/js/inspinia.js"></script>
<include file="Public/homefooter" />
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/umeditor/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/umeditor/umeditor.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/umeditor/lang/zh-cn/zh-cn.js"></script>

<!-- Custom and plugin javascript -->
<script>
    $(function(){
        var um = UM.getEditor('myEditor');
    })
</script>
</body>
</html>